#!/usr/bin/env python
# -*- coding: utf-8 -*-

import pymysql

db = pymysql.connect(
    host="127.0.0.1",
    user='root',
    password='123456',
    database='sql_prac',
    port=3306
)

cursor = db.cursor()

sql = """
update question set content='爬虫相当简单' where id=11
"""
cursor.execute(sql)
db.commit()
print("数据更新完成")
db.close()
